// 设计注册时未输入用户名/密码时的报错对话框

// 关闭VSCode非必要报错对话框
// ignore_for_file: camel_case_types, sized_box_for_whitespace

import 'package:flutter/material.dart';
import 'package:project_award_statistics/utils/my_yaru_buttons/my_yaru_button_error_info.dart';
import 'package:yaru/yaru.dart';

class DialogRegisterErr_Exists_Desktop extends StatelessWidget {
  const DialogRegisterErr_Exists_Desktop({super.key});

  @override
  Widget build(BuildContext context) {
    return AlertDialog(
      backgroundColor: Theme.of(context).colorScheme.surface,
      // 设置对话框顶栏样式,并关闭边距设定
      titlePadding: EdgeInsets.all(0),
      title: YaruDialogTitleBar(
        title: Text(
          "注册错误",
          style: TextStyle(
            fontSize: 18,
            fontWeight: FontWeight.bold,
          ),
        ),
        isClosable: false,  // 设置不允许在标题栏关闭,只允许通过按按钮关闭
      ),
      content: Container(
        height: 140,
        width: 450,
        child: Column(   //设置列式布局容器
          children: [
            SizedBox(height: 20,),
            Text(
              "您已进行过注册,请勿重复注册!",
              style: TextStyle(
                fontSize: 19,
              ),
            ),
            SizedBox(height: 45,),
            SizedBox(
              height: 45,
              width: 200,
              child: MyYaruButton_ErrorInfo(
                text: "好的,我马上去检查", 
                onPressed: ()=>Navigator.of(context).pop(),
              ),
            ),
          ],
        ),
      ),
    );
  }
}
